package the.workshop.bu.dto.req;

import lombok.Data;
import org.springframework.beans.BeanUtils;
import the.workshop.bu.dto.CustomerCondition;

import java.util.Date;

@Data
public class CustomerQueryReq {

    private String name;
    private String legal;
    private String status;
    private String telNumber;
    private String salesId;

    private String fullName;

    /**
     * 开始时间，与创建时间比较
     */
    private Date startTime;

    /**
     * 结束时间，与创建时间比较
     */
    private Date endTime;

    /**
     * 区域，比如浙江省杭州市%
     */
    private String area;

    /**
     * 行业
     */
    private String industry;

    private String timeTag;

    private String keyword;
    private String orderBy;
    private Integer pageNum = 1;
    private Integer pageSize = 20;

    public CustomerCondition toCustomerCondition() {
        CustomerCondition condition = new CustomerCondition();
        BeanUtils.copyProperties(this, condition);
        return condition;
    }
}
